#include <sstream>
#include "Date.h"

Date::Date(int year, int month, int day) : year(year), month(month), day(day) {}

Date::Date(const Date &date) : year(date.year),month(date.month), day(date.day) {}

int Date::getYear() const {
    return year;
}

int Date::getMonth() const {
    return month;
}

int Date::getDay() const {
    return day;
}

void Date::setDate(int year, int month, int day) {
    Date::year = year;
    Date::month = month;
    Date::day = day;
}

std::string Date::toString() const {
    std::stringstream output;
    output << year << '-' << month << '-' << day;
    return output.str();
}